package game.controller;

import game.controller.Unit.MilitaryUnit;

import java.util.ArrayList;

/**
 * UnitController.java  Date Created: 07 05, 2013
 *
 * Purpose: To what units can an can't do as well as their location on the map.
 *
 * Description:  This class shall contain all the logic for unit actions and movement.
 * The units themselves shall store of what actions and movements they have taken.
 * Units shall not be added to the controller until they are placed on the map.
 * If a unit is KIA then that unit shall be removed from the controller.
 * (Captured units shall remain in the controller and noted via something)
 *
 * @author Chris
 */
public class UnitController {
    public UnitController(GameController gameController) {
        this.gameController = gameController;
        units = new ArrayList<MilitaryUnit>();
    }

    public void addUnits(ArrayList<MilitaryUnit> newUnits) {
        units.ensureCapacity(newUnits.size());
        units.addAll(newUnits);
    }

    private ArrayList<MilitaryUnit> units;
    private GameController gameController;
}
